package com.topone.dataObject;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.topone.Enum.BussinessStatusEnum;
import com.topone.Utils.EnumUnitl;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import org.joda.time.DateTime;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

/**
 * 商家信息
 * Created by Administrator on 2017/11/6,0006.
 */
@Entity
@DynamicUpdate
@Data
public class Bussiness {
    @Id
    private String bussinessId; //商家Id
    private String bussinessCode;//商家code
    private String openid;
    private String bussinessName; //商家名称
    private String bussinessUserName; //负责人姓名
    private String bussinessProduct;  //商家产品
    private String bussinessCategory; //商家种类（吃喝玩乐）
    private String bussinessRank;  //业态（火锅，中式，日式）
    private String bussinessAddress; //商家地址
    private String bussinessPhone;   //商家电话
    private String bussinessPosition; //商家位置
    private String bussinessWechatUrl; //商家公众号地址
    private String bussinessIntroduce; //商家介绍
    private String telephone;          //联系方式
    private String bussinessIcon;     //商家图片
    private String bussinessPassword; //密码
    private Integer bussinessStatus= BussinessStatusEnum.suceess.getCode();  //商家状态
    private Date createTime;
    private Date updateTime;
    //private List<TcCoupon> couponList;

    @JsonIgnore
    public BussinessStatusEnum getBussinessStatusEnum(){

        return EnumUnitl.getByCode(bussinessStatus,BussinessStatusEnum.class);
    }

}
